package com.kcht.itsed.mws.subscribescheduler.biz;

import java.io.InputStream;

/**
 * 具体的报告发送者实现此接口
 * @author zhangwenshuo
 *
 */
public interface IConcreteReportSender {
	
	
	/**
	 * 发送报告
	 * @param reportXml	原始报告文本
	 * @throws ReportSendFailException
	 */
	void send(InputStream reportIS)throws ReportSendFailException;
	
	/**
	 * 报告发送状态
	 * @return
	 */
	ReportSendingState getSendingState();
	
	
	public static enum ReportSendingState{
		SENDING,DISCONNECTED,ERROR 
	}
	
	public static class ReportSendFailException extends RuntimeException{

		/**
		 * 
		 */
		private static final long serialVersionUID = 1L;

		public ReportSendFailException() {
			super();
		}

		public ReportSendFailException(String message, Throwable cause, boolean enableSuppression,
				boolean writableStackTrace) {
			super(message, cause, enableSuppression, writableStackTrace);
		}

		public ReportSendFailException(String message, Throwable cause) {
			super(message, cause);
		}

		public ReportSendFailException(String message) {
			super(message);
		}

		public ReportSendFailException(Throwable cause) {
			super(cause);
		}
		
		
	}
	
	
}
